package com.ruoyi.resource.domain;

public enum ResourceEnum {

    VIDEO(1,"视频"),

    IMAGE(2, "图片"),

    PDF(3,"PDF文件");

    private int value;

    private String name;

    public String getName() {
        return name;
    }

    public int getValue(){
        return value;
    }

    ResourceEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public static ResourceEnum valueOf(int value) {
        for(ResourceEnum resource:ResourceEnum.values()) {
            if(resource.getValue() == value) {
                return resource;
            }
        }
        return null;
    }



}
